package org.advanced.publish;

import java.util.HashMap;
import java.util.Map;

/**
 * @author John.zhang
 * @version Id: Finals, v 1.0 2020/12/11 14:57 ZhiYong Exp $
 * final 通过防止指令重排序，避免final域的初始化引用重排序到构造之外
 */
public class Finals {

    private final Map<String, String> states;

    public Finals() {
        this.states = new HashMap<>();
        states.put("name","John");
    }
}
